close all;clear all;

sf_clct = SIFT;
pic = imread('lena_s.png');

sigma = 1.6;
octvs = 3;
contr_thr = 0.04;
curv_thr = 10;

init_img = sf_clct.init_img(pic, 1, sigma);
sz = size(init_img);
scls = floor(log(min(sz(1), sz(2))) / log(2)) - 2;
gpyr = sf_clct.build_gauss_pyr(init_img, scls, octvs, sigma);

% for i=1 : scls
%     figure(i);imshow(gpyr{i,1});
% end

dog_pyr = sf_clct.build_dog_pyr(gpyr);
% for i = 1 : scls
%     figure(i); imshow(dog_pyr{i,1});
% end

ex_seq = sf_clct.scale_space_extrema(dog_pyr, scls, octvs, contr_thr, curv_thr);